home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / introduction / 121 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: mail2news.demon.co.uk!phalanx.demon.co.uk
  2. From: Jaspal Singh <Jas@phalanx.demon.co.uk>
  3. Newsgroups: comp.sys.amiga.introduction
  4. Subject: Re: Silly script question
  5. Date: Fri, 19 Jan 96 14:16:30 GMT
  6. Organization: ACME Chickens
  7. Message-ID: <9601191416.AA0009a@phalanx.demon.co.uk>
  8. References: <4dm9jf$duo@sue.cc.uregina.ca>
  9. X-NNTP-Posting-Host: phalanx.demon.co.uk
  10. X-Newsreader: TIN [AMIGA 1.3 950726BETA PL0]
  11. X-Mail2News-Path: relay-4.mail.demon.net!post.demon.co.uk!phalanx.demon.co.uk
  12.  
  13. John  Bayko (bayko@ARISTOTLE.CS.UREGINA.CA) wrote:
  14. :     The AmigaDOS user manual doesn't say how to access the arguments
  15. : when a shell script is called (like in Unix csh, "echo $1" would echo
  16. : the first parameter). How do I do this in Amiga shell scripts, or do I
  17. : have to use AREXX?
  18.  
  19. You don't need ARexx. All you need to do is enclose the argument within <>.
  20. Example script file
  21.  
  22.     .KEY name/A
  23.     echo "you are called <name>"
  24.  
  25. This script takes one argument and displays. Most people change the <> to
  26. {}.
  27.  
  28.     .KEY name/A
  29.     .BRA {
  30.     .KET }
  31.     echo "you are called {name}"
  32.  
  33. Jas
  34. -- 
  35. .-------------------------------------------------------------------------.
  36. !Email Jas@phalanx.demon.co.uk    (ACME Chickens)                  !
  37. !T-Shirt saying: The only person to ever enter Parliament with honest      !
  38. !                intensions was Guy Fawkes.                  !
  39. `-------------------------------------------------------------------------'
  40.  
  41.